{extends file="assets::smarty-templates::Master"|ToPath}
{block name=content}
{html_css file="whiteLabel/light/jquery.datatables.css"}
{html_css file="tooltip/coda.css"}

<h1>Listado de Aspirantes</h1>
<fieldset>
    <table class="datatable">
        <thead>
            <tr>
                <th>Codigo</th>
                <th>Nombre</th>
                <th>Programa</th>
                <th>Tipo de Candidatura</th>
                <th>Estado</th>
                <th style="width: 10px;"></th>
            </tr>
        </thead>
        <tbody>
            {foreach $representantes as $representante}
                {$url = "{$verRepresentante}&CodigoEstudiante={$representante["1"]}"}
                <tr>
                    <td>{$representante["1"]}</td>
                    <td>{$representante["0"]}</td>
                    <td>{$representante["2"]}</td>
                    <td>{if $representante["4"] == 0}Consejo Academico{else}Representate de Facultad{/if}</td>
                    <td>{if $representante["3"] == 1}Aprobado{else}{if $representante["3"] == null}Pendiente{else}Rechazado{/if}{/if}</td>
                    <td>
                        <a href="{$url}" class="small btn onlyicon icon tooltip i_list_image" title="Ver Detalles del Representante"></a>
                    </td>
                </tr>
            {/foreach}
        <tbody>
    </table>
</fieldset>

<script type="text/javascript">
    {literal}
        require(["WhiteLabel.datatables", "jQuery.ToolTip", "jquery"], function(jQuery){
            jQuery(document).ready(function($){
                $(".tooltip").tooltip({
                    track: true,
                    delay: 0,
                    fixPNG: true,
                    top: -5,
                    left: 30
                });
                /*
                    top: 15,
                    left: 10
                */ 
            });
        });
    {/literal}
</script>

{/block}